<template>
  <div class="home">
    <div style="width: 250px;padding-top: 50px">
      <div style="width: 100%;display: flex;justify-content: center">
        <h1 style="color: aliceblue">{{ title }}</h1>
      </div>
      <div style="margin-bottom: 15px;">
        <input v-model="text" type="text" style="width: 100%">
      </div>
      <div style="justify-content: center;display: flex">
        <a-button @click="Greet">提交</a-button>
      </div>
    </div>
  </div>
</template>

<script>
import {ref} from "vue"

export default {
  name: 'Home',
  components: {},
  setup() {
    let text = ref("")
    let title = ref("Hello World")
    const Greet = () => {
      window.go.main.App.Greet(text.value).then(res => {
        title.value = res
      })
    }
    return {
      text,
      title,
      Greet
    }
  }
}
</script>

<style scoped>
.home {
  display: flex;
  justify-content: center;
  align-content: center;
}
</style>